/* ----------------------------------------------------------------------
*
* Copyright (C) 2025 XiaoFei. All rights reserved.
*
* $file:		XiaoZhi_SoilHumiResis.h
* $Date:        31-January-2025
* $Revision: 	V1
* $Project: 	XiaoFei BSP Library
* $Taobao:      https://item.taobao.com/item.htm?abbucket=17&id=796871456983
*
* -------------------------------------------------------------------- */

#ifndef __XiaoZhi_SoilHumiResis_H
#define __XiaoZhi_SoilHumiResis_H

#define SoilHumiResis_Use_ADC2
#define SoilHumiResis_RCC_AO			RCC_APB2Periph_GPIOA
#define SoilHumiResis_GPIO_AO			GPIOA
#define SoilHumiResis_PIN_AO			GPIO_Pin_1
#define SoilHumiResis_ADC_Channel		ADC_Channel_1

/* 
* @function: 	SoilHumiResis_Init
*/
void SoilHumiResis_Init(void);

/* 
* @function: 	SoilHumiResis_GetValue
* @return:		The ADC value from humidity sensitive resistpor. This value will be mapped from 0 to 3.3 volts to 0 to 4096.
*/
unsigned int SoilHumiResis_GetValue(void);

/* 
* @function: 	SoilHumiResis_GetVoltage
* @return:		The Voltage value from humidity sensitive resistpor. This value need to be limited to 0 to 3.3 volts.
*/
float SoilHumiResis_GetVoltage(void);

#endif


